package com.fzh.service;

import java.util.List;

import com.fzh.pojo.entity.User;

public interface UserService {
	
	/**
	 * 鍚庡彴鐨勭櫥褰曢獙璇�
	 * @param user
	 * @return
	 */
	public User backLogin(String name,String password);
	
	/**
	 * 鏌ヨ鍑烘墍鏈夌殑鐢ㄦ埛淇℃伅
	 * @return
	 */
	public List<User> queryAllUser(int setValue,int limit,String name,String gender,String isAdmin);
	/**
	 * 鏌ヨ鍑簎ser琛ㄩ噷鐨勬�绘潯鏁�
	 * @return
	 */
	public int queryUserCounts(String name,String gender,String isAdmin);
	/**
	 * 娣诲姞涓�涓敤鎴�
	 * @param user
	 * @return
	 */
	public Boolean addUser(User user);
	/**
	 * 鏍规嵁id淇敼涓�涓敤鎴�
	 * @param user
	 * @return
	 */
	public Boolean editUserById(User user);
	/**
	 * 鏍规嵁ids鎵归噺鐨勫垹闄ょ敤鎴�
	 * @param ids
	 * @return
	 */
	public Boolean delAllUserByIds(String id);
	/**
	 * 鏍规嵁id鍒犻櫎涓�涓敤鎴�
	 * @param id
	 * @return
	 */
	public Boolean delUserById(int id);

	/**
	 * 褰撶敤鎴风櫥褰曟椂锛屼慨鏀圭敤鎴风殑鐧诲綍鏃堕棿
	 * @param id
	 */
	public void editUserLastLoginTimeById(Integer id);
	
	
	/**
	 * 鐢ㄤ笌鏌ヨ鍑烘槸鍚﹀瓨鍦ㄨ鐢ㄦ埛鍚嶅瀛樺湪鍒欑瓑绾ч敊璇鏁�
	 * @param name
	 * @return
	 */
	public User queryUserByNameVerifyError(String name);

	/**
	 * 缂栬緫鐢ㄦ埛璐﹀彿鐨勬槸鍚﹂攣瀹氱姸鎬�
	 * @param id
	 * @param number
	 * @return
	 */
	public Boolean editUserIsLockById(Integer id, Integer number);

	/**
	 * 淇敼鐢ㄦ埛璐︽埛鏄惁鎴愪负绠＄悊鍛�
	 * @param id
	 * @param number
	 * @return
	 */
	public Boolean editUserAdminStatusById(Integer id, Integer number);

	/**
	 * 鏌ヨ鍑烘墍鏈夌敤鎴风敤浜庤鍗曢〉闈笅鎷夋灞曠ず
	 * @return
	 */
	public List<User> queryAllUserWitchOrderIndoSelect();

	/**
	 * 缂栬緫绠＄悊鍛樼殑閿欒娆℃暟鏍规嵁id
	 * @param id
	 * @param errorCount
	 */
	public void eidtUserErrorCountById(Integer id, int errorCount, String datestr);

	/**
	 * 鍦ㄤ釜浜轰俊鎭〉缂栬緫鍩虹鐨勭櫥褰曡�呯敤鎴蜂俊鎭�
	 * @param user
	 * @return
	 */
	public Boolean editUserBasicInformationById(User user);

	/**
	 * 鏌ヨ鍑烘墍鏈夌敤鎴风殑淇℃伅鏍规嵁name鏉ユ煡璇㈠鏌ヨ鍑烘湁鑰呯粰鎻愮ず淇℃伅鐢ㄦ埛鍚嶄笉鑳介噸澶�
	 * @param newName
	 * @return
	 */
	public Boolean queryAllUserByNameWitchVerify(String newName);

	/**
	 * {鍓嶅彴}鐧诲綍楠岃瘉
	 * @param name
	 * @param password
	 * @return
	 */
	public User frontLogin(String name, String password);
	
	public User selectByuserId(Integer id);
	
	public int updateUserById(User user);
	
	public User selectLogins(Integer id, String password);
	
	public int updatePassWord(Integer id,String password);

}
